<#assign s=JspTaglibs["/WEB-INF/struts-tags.tld"] />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
	<link rel="stylesheet" type="text/css" href="../styles/global.css"/>
	<link rel="stylesheet" type="text/css" href="../styles/elements.css"/>
	<link rel="stylesheet" type="text/css" href="../scripts/jquery-ui-1.8.16/jquery-ui-1.8.16.custom.css" />
	<script type="text/javascript" src="../scripts/jquery-ui-1.8.16/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="../scripts/jquery-ui-1.8.16/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="../scripts/highstock-1.0.Beta/highstock.js"></script>
	<script type="text/javascript" src="../scripts/highstock-1.0.Beta/themes/grid.js"></script>
	<script type="text/javascript" src="../scripts/common.js"></script>
<script type="text/javascript">
<#if fhlist?size &gt; 0>
	function init_fh(){
		/* 初始化分红表 */
		var chartOptions = {
			chart: {
				renderTo: 'chart-fh',
				defaultSeriesType:"line"
			},
			title: {
				text: '分红历史'
			},
			xAxis: {
				categories: []
			},					
			yAxis: {
				min: 0,
				title: {
					text: '数量'
				}
			},
			tooltip: {
				formatter: function() {
					return '<b>'+ this.x +'</b><br/>'+
						 this.series.name +': '+ formatMoney(this.y);
				}
			},
			series: []
		};
		var series1 = {
				name :"每股分红（元）",
				data: []
		};
		var series2 = {
				name :"每股送股（股）",
				data: []
		};
		var series3 = {
				name :"每股转股（股）",
				data: []
		};
		<#list fhlist as fh>
			chartOptions.xAxis.categories.push('${fh.id.ggr}');
			series1.data.push(${fh.mgfh?c});
			series2.data.push(${fh.mgsg?c});
			series3.data.push(${fh.mgzg?c});
		</#list>
		chartOptions.series.push(series1);
		chartOptions.series.push(series2);
		chartOptions.series.push(series3);
		new Highcharts.Chart(chartOptions);
	}
	init_fh();
</#if>

<#if pglist?size &gt; 0>
	function init_pg(){
		/* 初始化分红表 */
		var chartOptions = {
			chart: {
				renderTo: 'chart-pg',
				defaultSeriesType:"line"
			},
			title: {
				text: '配股历史'
			},
			xAxis: {
				categories: []
			},					
			yAxis: {
				min: 0,
				title: {
					text: '数量'
				}
			},
			tooltip: {
				formatter: function() {
					return '<b>'+ this.x +'</b><br/>'+
						 this.series.name +': '+ formatMoney(this.y);
				}
			},
			series: []
		};
		var series1 = {
				name :"每股配送（股）",
				data: []
		};
		var series2 = {
				name :"配股价格（元）",
				data: []
		};
		var series3 = {
				name :"募集资金（元）)",
				data: []
		};
		<#list pglist as pg>
			chartOptions.xAxis.categories.push('${pg.id.ggr?string('yyyy-MM-dd')}');
			series1.data.push(${pg.pgbl?c});
			series2.data.push(${pg.pgjg?c});
			series3.data.push(${pg.sjmjzj?c})
		</#list>
		chartOptions.series.push(series1);
		chartOptions.series.push(series2);
		chartOptions.series.push(series3);
		new Highcharts.Chart(chartOptions);
	}
	init_pg();
</#if>
<#if !fhlist?? && !pglist??>
	$("#nodata").css("text-align","center");
	$("#nodata").show();
</#if>
</script>
<style>
</style>
</head>
<body>
	<!-- 分红表 -->
	<#if fhlist?size &gt; 0>
		<table class="datatable">
		<caption>分红历史</caption>
		<thead>
			<tr>
				<th>公告日</th>
				<th>每股分红</th>
				<th>每股送股</th>
				<th>每股转股</th>
				<th>派现额度</th>
				<th>股权登记日</th>
				<th>股权除息日</th>
			</tr>
		</thead>
		<tbody>
			<#list fhlist as fh>
			<tr>
				<td>${fh.id.ggr}</td>
				<td>${fh.mgfh!''}</td>
				<td>${fh.mgsg!''}</td>
				<td>${fh.mgzg!''}</td>
				<td>${fh.pxed!''}</td>
				<td><#if fh.djr??>${fh.djr?string('yyyy-MM-dd')}</#if></td>
				<td><#if fh.cxr??>${fh.cxr?string('yyyy-MM-dd')}</#if></td>
			</tr>
			</#list>
		</tbody>
		</table>
		
		<div id="chart-fh"></div>
	</#if>
	
	<!-- 配股 表-->
	<#if pglist?size &gt; 0>
		<table class="datatable">
		<caption>配股历史</caption>
		<thead>
			<tr>
				<th>公告日</th>
				<th>每股配送（股）</th>
				<th>配股价格（元）</th>
				<th>募集资金</th>
				<th>配股登记日</th>
				<th>配股除权日</th>
				<th>配股上市日</th>
				<th>配股经销商</th>
			</tr>
		</thead>
		<tbody>
			<#list pglist as pg>
			<tr>
				<td>${pg.id.ggr?string('yyyy-MM-dd')}</td>
				<td>${pg.pgbl}</td>
				<td>${pg.pgjg!""}</td>
				<td>${pg.sjmjzj!""}</td>
				<td><#if pg.pgssr??>${pg.pgdjr?string('yyyy-MM-dd')}</#if></td>
				<td><#if pg.pgssr??>${pg.pgcqr?string('yyyy-MM-dd')}</#if></td>
				<td><#if pg.pgssr??>${pg.pgssr?string('yyyy-MM-dd')}</#if></td>
				<td>${pg.pgcxs!""}</td>
			</tr>
			</#list>
		</tbody>
		</table>
		
		<!-- 配股图 -->
		<div id="chart-pg"></div>
	</#if>
	<div id="nodata" style="display:none">没有分红或配股记录</div>
</body>
</html>